<!--仿照Siri实现一个-->

<template>
  <div class="siri-container">
    <div class="siri-animation">
      <div class="circle"></div>
      <div class="circle"></div>
      <div class="circle"></div>
      <div class="circle"></div>
    </div>
  </div>
</template>

<style scoped>
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #000;
}

.siri-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 200px;
  perspective: 1000px;
}

.siri-animation {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.circle {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff004e, #0cd7fd);
  transform-origin: center center -80px; /* 圆心在 Z 轴上 */
  animation: self-rotate 5s linear infinite;
}

.circle:nth-child(1) {
  animation-duration: 5s;
}

.circle:nth-child(2) {
  animation-duration: 6s;
}

.circle:nth-child(3) {
  animation-duration: 7s;
}

.circle:nth-child(4) {
  animation-duration: 8s;
}

@keyframes self-rotate {
  0% {
    transform: rotateY(0deg) translateZ(80px);
  }
  100% {
    transform: rotateY(360deg) translateZ(80px);
  }
}
</style>
